

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@protocol LeavesViewDataSource;

@interface LeavesCache : NSObject

@property (nonatomic, assign) CGSize pageSize;
@property (assign) id<LeavesViewDataSource> dataSource;

- (id)initWithPageSize:(CGSize)aPageSize;
- (CGImageRef)cachedImageForPageIndex:(NSInteger)pageIndex;
- (void)precacheImageForPageIndex:(NSInteger)pageIndex;
- (void)minimizeToPageIndex:(NSInteger)pageIndex;
- (void)flush;

@end
